/* eslint-disable no-unused-vars */


// 官网地址https://hhyang.cn/v2/start/introduction.html

import { RouterMount, createRouter } from 'uni-simple-router'

const router = createRouter({
  platform: process.env.VUE_APP_PLATFORM,
  applet: {
    animationDuration: 300,
  },
  detectBeforeLock: (router) => {
    router.$lockStatus = false
  },
  h5: { rewriteFun: false },
  routes: [
    // eslint-disable-next-line no-undef
    ...ROUTES,
    { path: '*',
      redirect: (to) => ({ name: '404Index' }),
    },
  ],
})

// 全局路由前置守卫
router.beforeEach((to, from, next) => {
  next()
})
// 全局路由后置守卫
router.afterEach((to, from) => {
  
})


export {
  router,
  RouterMount,
}